package com.melon;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;


/**
 * 主函数入口
 */
@Controller
@SpringBootApplication
//@EntityScan(basePackageClasses=City.class)
public class MelonApplication {
    private static final Logger LOGGER = LoggerFactory.getLogger(MelonApplication.class);

    public static void main(String[] args) {
        LOGGER.debug("run the spring boot");
        SpringApplication.run(MelonApplication.class, args);
    }

    /**
     * 启动类设定根目录访问页
     *
     * @return
     */
    @RequestMapping("/")
    public String home() {
        return "redirect:/actuator";
    }
}
